// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Animations FS by Thimo LOADED!");
	print("--------------------------------------\n");
	return 1;
}


CMD:anims(playerid, params[])
{
	new string[2000];
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Walk drunk\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Handsup\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 1\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 2\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 3\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 4\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 5\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 6\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Arrest\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Sit\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Door kick\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Bitch slap\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Grab left\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Grab right\n");
	format(string, sizeof(string), "%s%s", string, "{00C0FF}Dance 7\n");
	format(string, sizeof(string), "%s%s", string, "{C77D87}Animoff (only work on dance 7 others stop with LMB)\n");
	ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{F3FF02}Animations", string, "Ok", "Cancel");
	return 1;

}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(response)
		{
		switch(dialogid)
			{
			    case 999:
			        {
						switch(listitem)
						{
						    case 0:
						    {
						    	ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);
							}
							case 1:
							{
 							   	ApplyAnimation(playerid,"PED","handsup", 4.1,0,1,1,1,1,1);
							}
							case 2:
							{
							    ApplyAnimation(playerid,"DANCING","dance_loop",4.1,1,1,1,1,1,1);
							}
							case 3:
							{
							    ApplyAnimation(playerid,"DANCING","DAN_Down_A",4.1,1,1,1,1,1,1);
							}
							case 4:
							{
							    ApplyAnimation(playerid,"DANCING","DAN_Left_A",4.1,1,1,1,1,1,1);
							}
							case 5:
							{
								ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,1,1,1,1,1,1);
							}
							case 6:
							{
							    ApplyAnimation(playerid,"DANCING","DAN_Right_A",4.1,1,1,1,1,1,1);
							}
							case 7:
							{
							    ApplyAnimation(playerid,"DANCING","DAN_Up_A",4.1,1,1,1,1,1,1);
							}
							case 8:
							{
							    ApplyAnimation(playerid,"PED","ARRESTgun",4.1,0,1,1,1,1,1);
							}
							case 9:
							{
                                ApplyAnimation(playerid,"PED","SEAT_idle",4.1,0,1,1,1,1,1);
							}
							case 10:
							{
						        ApplyAnimation(playerid,"POLICE","Door_Kick",4.1,0,1,1,1,1,1);
							}
							case 11:
							{
								ApplyAnimation(playerid,"MISC","bitchslap",4.1,0,1,1,1,1,1);
							}
							case 12:
							{
							    ApplyAnimation(playerid,"MISC","GRAB_L",4.1,0,1,1,1,1,1);
							}
							case 13:
							{
							    ApplyAnimation(playerid,"MISC","GRAB_R",4.1,0,1,1,1,1,1);
							}
							case 14:
							{
								ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
							}
							case 15:
							{
							    ClearAnimations(playerid);
							}
						}
					}
				}
			}
 	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
